var cluster=require("cluster"),
    os=require("os");

if(cluster.isMaster){
    var cupNums=os.cpus().length;
    console.log(cupNums);
    for(var i=0;i<cupNums;i++){
        cluster.fork();
    }

    cluster.on("listening",function(worder,address){
        //console.log('[master] ' + 'listening: worker' + worker.id + ',pid:' + worker.process.pid + ', Address:' + address.address + ":" + address.port);
    });
}
else if(cluster.isWorker){
   require("./server") 
}

